package com.bsj.power.common.constant;

/**
 * @author LiJiaXin
 * @version 1.0.0
 * @description 正则表达式
 * @time 2024/4/19 9:50
 */
public class RegularExpression {

    /**
     * iccid
     */
    public static final String ICCID_REGULAR = "^[A-Z0-9]{18,20}$";

    /**
     * 电话号
     */
    public static final String PHONE_REGULAR = "^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0,1,3,5,6,7,8])|(18[0-9])|(19[0,1,2,3,5,6,7,8,9]))\\d{8}$";

    /**
     * 身份证号码
     */
    public static final String CARD_NUMBER_REGULAR = "^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}([0-9Xx])$";

    /**
     * 特定格式校验（支持纯数字）
     */
    public static final String NUMBER_FORMAT_REGULAR = "[0-9]+";

    /**
     * 匹配是否有中文或中文标点或字母
     */
    public static final String CHINESE_OR_LETTER_REGULAR = "[\u4E00-\u9FA5|\\！|\\，|\\。|\\（|\\）|\\《|\\》|\\“|\\”|\\？|\\：|\\；|\\【|\\】]|[a-zA-Z]";

}
